#include<vector>
#include<iostream>


template<typename T,            //要创建的对象类型
         typename... Ts>        //要使用的实参的类型
void doSomeWork(Ts&&... params)
{
    std::cout << __PRETTY_FUNCTION__ << std::endl;
    T obj(std::forward<Ts>(params)...);
    std::cout << obj.size() << std::endl;
} 

template<typename T,
         typename... Ts>
void doSomeWork2(T&& param, Ts&&... params)
{
    std::cout << __PRETTY_FUNCTION__ << std::endl;
    T obj{std::forward<Ts>(params)...};
    std::cout << obj.size() << std::endl;
}

int main()
{
    doSomeWork<std::vector<int>>(10, 20);
    doSomeWork2<>(std::vector<int>{10, 20});
}



